# -*- coding: utf-8 -*-
# @Author  : Zhang.Jingyi

"""
Preprocess datasets and generate npz files to be used for training testing.
It is recommended to first read datasets/preprocess/README.md
"""

from _init_path import *
import argparse
from preprocess import ped_extract
#from preprocess import ped_statistic
import config as cfg

parser = argparse.ArgumentParser()
parser.add_argument('--train_pedx', default=False, action='store_true',
                    help='Extract pedx files for training')
parser.add_argument('--val_pedx', default=False, action='store_true',
                    help='Extract pedx files for valuation')
# parser.add_argument('--statistic', default=False, action='store_true',
#                     help='statistic number of points of one person')
if __name__ == '__main__':
    args = parser.parse_args()
    
    # define path to store extra files
    # if args.statistic:
    #     if args.train_pedx:
    #         ped_statistic(cfg.PEDX_ROOT, cfg.PEDX_ROOT, 'train')
    # 
    #     if args.val_pedx:
    #         ped_statistic(cfg.PEDX_ROOT, cfg.PEDX_ROOT, 'test')
    # else:
    if args.train_pedx:
        ped_extract(cfg.PEDX_ROOT, cfg.PEDX_ROOT, 'train')

    if args.val_pedx:
        ped_extract(cfg.PEDX_ROOT, cfg.PEDX_ROOT, 'test')